﻿
using System;

namespace Evolution.Client.ImportData.Commands
{
    public static class CommandParser
    {
        /// <summary>
        /// Create command based on CommandAction
        /// </summary>
        /// <param name="commandAction"></param>
        /// <returns></returns>
        public static ICommand Parse(ActionTypes commandAction)
        {
            switch (commandAction)
            {
                case ActionTypes.ImportData:
                    return new DeserializeAndImportCommand();
                case ActionTypes.GenerateDataTemplate:
                    return new GenerateDataObjectTemplateCommand();
                default:
                    return new DefaultCommand();
            }
        }
    }
}